Vue.component("show", {
  //模板语法
  props: ["abb"],
  template: `
   
     <ul>
            <li v-for="item in abb">
            <p><img :src="item.url" alt=""></p>
            <p>{{item.name}}</p>
            <p>{{item.price}}</p>
            </li>
        </ul>
        
    `,
});
const app = new Vue({
  el: "#app",
  data: {
    all: [],
    aee:{"name":"","url":"","price":""
    }
  },
  created() {
    axios({
      method: "get",
      url: "./js/homework.json",
    }).then((res) => {
      //数据赋值
      this.all = res.data;
    //   console.log(res);
    });
  },
  methods:{
      add(){
          this.all.unshift(this.aee)
     },
      //升序
      sort(){
        
      }
  }
});
